home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / util / wb / startpanel.lha / StartPanel / Arexx / Miami_On.rexx < prev    next >
OS/2 REXX Batch file  |  1998-11-05  |  2KB  |  53 lines

  1. /*     ___       ___                                                          */
  2. /*   _/  /_______\  \_     ___ ___ __ _                       _ __ ___ ___    */
  3. /*__//  / _______ \  \\___/                                               \___*/
  4. /*_/ | '  \__ __/  ` | \_/        © Copyright 1998, Christopher Page       \__*/
  5. /* \ | |    | |__  | | / \               All Rights Reserved               /  */
  6. /*  >| .    |  _/  . |<   >--- --- -- -                       - -- --- ---<   */
  7. /* / \  \   | |   /  / \ / This file may not be distributed, reproduced or \  */
  8. /* \  \  \_/   \_/  /  / \  altered, in full or in part, without written   /  */
  9. /*  \  \           /  /   \    permission from Christopher Page except    /   */
  10. /* //\  \_________/  /\\ //\     under the conditions in the StartPanel  /    */
  11. /*- --\   _______   /-- - --\        documentation, legal section       /-----*/
  12. /*-----\_/       \_/---------\   ___________________________________   /------*/
  13. /*                            \_/                                   \_/       */
  14. /*                                                                            */
  15. /* Description:                                                               */
  16. /*                                                                            */
  17. /*  This arexx script will instruct Miami to attempt to go online. If Miami   */
  18. /*  is not loaded then this script will attempt to load it before sending the */
  19. /*  online command. The script requires you to have set up the Miami: assign. */
  20.  
  21. options results
  22. ADDRESS COMMAND
  23.  
  24. DO_STDERR = 0;
  25. IF OPEN(STDERR, "CON:////Miami_On.rexx -- Error messages window/WAIT/AUTO", "w") then DO_STDERR = 1
  26.  
  27. if ~show('p', 'MIAMI.1') then do
  28.  
  29.     'wbrun Miami:Miami'
  30.  
  31.     cpt=0
  32.     do while ~show('p', 'MIAMI.1')
  33.         'wait 1'
  34.         cpt = cpt + 1
  35.         if cpt=10 then do
  36.             if DO_STDERR then do
  37.                 call writeln(STDERR, "Timeout while waiting for Maimi to start.")
  38.             end
  39.             call quit
  40.         end
  41.     end
  42. end
  43.  
  44. address MIAMI.1 online
  45.  
  46. error:
  47. syntax:
  48. quit:
  49.  
  50. if DO_STDERR then call close(STDERR);
  51.  
  52. exit 0
  53.